from PyQt5.Qt import *

class MyQWidget(QWidget):
    def __init__(self):
        super().__init__()
        # 初始化UI
        self.setup_ui()

    def setup_ui(self):
        self.setWindowTitle("我是标题")
        self.resize(500, 500)
        self.move(200, 300)
        label = QLabel(self)
        label.setText("Hello Qt")
        label.move(200, 200)

# 测试
if __name__ == '__main__':
    import sys
    app = QApplication(sys.argv)
    window = MyQWidget()
    window.show()
    sys.exit(app.exec_())